#!/bin/bash

# Set Host Power Status Running
busctl set-property xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host CurrentHostState s xyz.openbmc_project.State.Host.HostState.Running

systemctl start obmc-led-group-start@power_on.service

# The hardware disables the multiplexer in standby
# to prevent sending a command by mistake to the retimer when it boots up.
# Therefore, we need to rebind it when powered on.

if [ ! -e "/sys/bus/i2c/drivers/pca954x/3-0070" ]; then
  sleep 6
  /usr/bin/echo 3-0070 > /sys/bus/i2c/drivers/pca954x/bind
fi

exit 0
